package com.fh.util;

import com.fh.entity.system.User;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

/**
 * @author chenhao
 * @Title: 工具类
 * @Param $method_param$
 * @Retrun CHdemo
 * @date 2018/5/24
 */
public class BaseUtil {

   /**
        *
        * @Title:  对session 的封装，获取session数据
        * @reason
        * @author :  陈豪
        * @date  2018/5/24
        */
    public static   <T> T getSession(T sessionClass, HttpServletRequest request,String type){
        HttpSession session = request.getSession();
        T  sessionValue = (T)session.getAttribute(type);
        return sessionValue;
    }
}
